package com.itheima.project.face;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.itheima.project.exception.ProjectException;
import com.itheima.project.vo.dict.DataDictVo;

import java.util.List;
import java.util.Set;

/**
 * @ClassName DataDictFace.java
 * @Description：数字字典face接口类
 */
public interface DataDictFace {

    /***
     * @description 数据字典列表数据
     * @param dataDictVo 查询条件
     * @param pageNum 页码
     * @param pageSize 每页条数
     * @return:  Page<DataDictVo>
     */
    Page<DataDictVo> findDataDictVoPage(DataDictVo dataDictVo, int pageNum, int pageSize) throws ProjectException;

    /**
     * @Description 保存字典数据
     * @return
     */
    DataDictVo saveDataDict(DataDictVo dataDictVo) throws ProjectException;

    /**
     * @Description 修改字典数据
     * @return
     */
    DataDictVo updateDataDict(DataDictVo dataDictVo) throws ProjectException;

    /**
     * @Description 根据dataKey获取DataDictVo
     * @return
     */
    DataDictVo findDataDictVoByDataKey(String dataKey) throws ProjectException;

    /**
     * @Description 获取keys的数据
     * @return
     */
    List<DataDictVo> findValueByDataKeys(List<String> dataKeys) throws ProjectException;

    /**
     * @Description 获取父key下的数据
     * @return
     */
    List<DataDictVo> findDataDictVoByParentKey(String parentKey) throws ProjectException;

    /**
     * @Description 获得所有不重复的ParentKey的set集合
     * @return set集合
     */
    Set<String> findParentKeyAll() throws ProjectException;

    /**
     * @Description 获得所有不重复的DataKey的set集合
     * @return set集合
     */
    Set<String> findDataKeyAll()throws ProjectException;

}
